﻿using MediatR;
using RBAC.LuFang.API.Application.Command.heathCommand;
using RBAC.LuFang.Domain.Traceability;
using RBAC.LuFang.Domin.Services.TraceabilityService;

namespace RBAC.LuFang.API.Application.CommandHandlers.heathCommandhandler
{
    public class heathSelectCommandHandler : IRequestHandler<heathSelectCommand, List<health>>
    {
        //显示保健信息
        private readonly IGoodsService _goodsService;

        public heathSelectCommandHandler(IGoodsService goodsService)
        {
            _goodsService = goodsService;
        }

        public async Task<List<health>> Handle(heathSelectCommand request, CancellationToken cancellationToken)
        {
            return await _goodsService.Gethealth(request.goodsId);
        }
    }
}
